package com.example.productdataserviceprovider.service;

import com.example.productdataserviceprovider.dao.entity.Product;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Service
public class ProductService {
    @Value("${server.port}")
    private int port;
    public List<Product> listProducts(){
        List<Product> ps=new ArrayList<>();
        ps.add(new Product(1,"ProductA from port:"+port,50));
        ps.add(new Product(2,"ProductB from port:"+port,100));
        ps.add(new Product(3,"ProductC from port:"+port,150));
        return ps;
    }


}
